package com.ac;

import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Test {

	public static void main(String[] args) {
		String content = "<p><img src=\"http://static_file/upload/62f7d174e2a4411aec0ca187x/d228f85699694411a66224978975b54c.jpg\" style=\"max-width:100%;\" contenteditable=\"false\" width=\"100%\"/><br/>自制鸡爪，针不戳</p><p>做法</p><p><video src=\"/static_file/upload/62f7d174e2a4411aec0ca187x/8e735a1d5c6047f482f64c4ef72d3a1a.mp4\" controls=\"controls\" style=\"max-width:100%\"></video></p><p>OK</p>";
		String regex = "src=\"([\\s\\S]*?)\"";
		Pattern pattern = Pattern.compile(regex);
		Matcher matcher = pattern.matcher(content);
		List<String> resList = new ArrayList<String>();
		while (matcher.find()) {
			String str = matcher.group(1);
			str = str.substring(str.lastIndexOf("/") + 1);
			str = str.substring(0, str.lastIndexOf("."));
			resList.add(str);
		}
		System.out.println(resList);
	}
}
